{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	{if $intStatuses >= 0}
                		<div class="headerTitle">
                        	<h2>
                            	<a href="{$refer}">Quản lý blog</a>
                                &raquo; chi tiết
                           	</h2>
                       	</div>
                    {/if} 
                    <div class="secData">
                    	<table width="100%" cellpadding="0" cellspacing="0" border="0">
                        	<thead>
                            	<tr>
                                	<th width="20%">Trường dữ liệu</th>
                                    <th>Thông tin</th>
                                </tr>
                            </thead>
                            <tbody>
                            	<tr class="odd">
                                	<td>Thành viên đăng:</td>
                                    <td><strong>{$row.userid|ouser}</strong></td>
                                </tr>
                                <tr class="even">
                                	<td>Tiêu đề:</td>
                                    <td>
                                    	<strong>{$row.title}</strong>
                                    </td>
                                </tr>
                            	<tr class="odd">
                                	<td>Nội dung:</td>
                                    <td class="content">
                                    	{$row.content}
                                    </td>
                                </tr>                                
                                <tr class="even">
                                	<td>Tình trạng</td>
                                    <td>
                                    	{if $row.status == 0}
                                            Chờ duyệt
                                        {elseif $row.status == 1}
                                            Đề xuất blog hay
                                        {elseif $row.status == 2}
                                            Đã duyệt
                                        {elseif $row.status|abs == 3}
                                        	{if $row.status == 3}
                                            	BQT xóa
                                            {else}
                                            	User xóa
                                            {/if}
                                        {else}
                                            Báo vi phạm
                                        {/if}
                                  	</td>
                                </tr>
                                {if isset($smarty.session.blog) && $smarty.session.blog > 0}   
                                	<tr class="odd">
                                		<td>&nbsp;</td>                                         
                                        <td>
                                            {if ($smarty.session.blog&1<<5) > 0}
                                            	{if $row.treport == 0}
                                                    {if $row.status == 0}
                                                        <a href="{$smarty.const.HOST_BACKEND}blog/act?paction=1&amp;blogid={$row.blogid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btn">Duyệt</a>
                                                    {elseif $row.status == 1}
                                                    	<a href="{$smarty.const.HOST_BACKEND}blog/act?paction=6&amp;blogid={$row.blogid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btnLarge">Gỡ bỏ Blog hay</a>
                                                   	{elseif $row.status == 2}
                                                    	<a href="{$smarty.const.HOST_BACKEND}blog/act?paction=5&amp;blogid={$row.blogid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btn">Blog hay</a>
                                                   	{elseif $row.status == 3}
                                                    	<a href="{$smarty.const.HOST_BACKEND}blog/act?paction=1&amp;blogid={$row.blogid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btn">Phục hồi</a>
                                                    {/if}
                                               	{else}
                                                    <a href="{$smarty.const.HOST_BACKEND}blog/act?paction=7&amp;blogid={$row.blogid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btnLarge">Gỡ bỏ vi phạm</a>
                                              	{/if}
                                            {/if}
                                            {if ($smarty.session.blog&1<<3) > 0} 
                                            	<a href="{$smarty.const.HOST_BACKEND}blog/act?paction=2&amp;blogid={$row.blogid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btn">Xóa</a> 
                                                {if $AppUI->type > 1}
                                                	<a href="{$smarty.const.HOST_BACKEND}blog/act?paction=4&amp;blogid={$row.blogid}&amp;refer={$refer|base64E}&amp;de=1&amp;uid={$row.userid}" class="btnLarge">Xóa khỏi database</a> 
                                                {/if}
                                            {/if}
                                       	</td>
                                    </tr>
                                {/if}
                            </tbody>
                        </table>
                    </div>
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
